package io.renren.modules.app.mapper;

import io.renren.modules.PCguanli.entity.QuestionEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * ClassName: QuestionMapper
 * Package: io.renren.modules.app.mapper
 * Description:
 *
 * @Author zzy
 * @Create 2024/4/22 20:39
 * @Version 1.0
 */
@Mapper
public interface  QuestionMapper {
    @Select("<script>" +
            "SELECT * FROM user_question WHERE number IN " +
            "<foreach item='item' index='index' collection='questionNumbers' open='(' separator=',' close=')'>" +
            "#{item}" +
            "</foreach>" +
            "</script>")
    List<QuestionEntity> getQuestionsByNumbers(@Param("questionNumbers") List<Long> questionNumbers);
}
